
import request from "@/utils/newrequst";

// SkU类别树结构
export const getTenantRolePage = (data: any = {}) => {
  return request({
    url: `/system/v1/sub/tenant/role/page`, method: "post", data: data,
  });
};
// 查询下级角色树 
export const getRoleResourceTree = (data: any = {}) => {
  return request({
    url: `/system/v1/sub/tenant/role/resource-tree`, method: "post", data: data,
  });
};
// 查询所有下级食堂名称 
export const getTenantSubKitchen = (data: any = {}) => {
  return request({
    url: `/system/v1/sub/tenant/role/list-sub-kitchen`, method: "post", data: data,
  });
};
// 删除角色 
export const getRoleDelete = (data: any = {}) => {
  return request({
    url: `/system/v1/sub/tenant/role/delete`, method: "post", data: data,
  });
};
// 保存角色 
export const getRoleSave = (data: any = {}) => {
  return request({
    url: `/system/v1/sub/tenant/role/save`, method: "post", data: data,
  });
};
// 编辑角色
export const getRoleEdit = (data: any = {}) => {
  return request({
    url: `/system/v1/sub/tenant/role/edit`, method: "post", data: data,
  });
};

// 获取食堂用户列表
export const getKitchenUserList = (data: any = {}) => {
  return request({
    url: `/system/v1/sub/tenant/user/page`, method: "post", data: data,
  });
};

// 添加食堂用户
export const addKitchenUser = (data: any = {}) => {
  return request({
    url: `/system/v1/sub/tenant/user/save`, method: "post", data: data,
  });
};

// 根据食堂查询角色
export const getKitchenRole = (data: any = {}) => {
  return request({
    url: `/system/v1/sub/tenant/user/list-role`, method: "post", data: data,
  });
};

// 修改食堂用户
export const setUserModify = (data: any = {}) => {
  return request({
    url: `/system/v1/sub/tenant/user/modify`, method: "post", data: data,
  });
};

// 设置用户角色
export const setUserRole = (data: any = {}) => {
  return request({
    url: `/system/v1/sub/tenant/user/save-role`, method: "post", data: data,
  });
};

// 设置用户状态
export const getUserStatus = (data: any = {}) => {
  return request({
    url: `/system/v1/sub/tenant/user/reset-status`, method: "post", data: data,
  });
};

// 重置密码
export const resetPassword = (data: any = {}) => {
  return request({
    url: `/system/v1/sub/tenant/user/reset-password`, method: "post", data: data,
  });
};


